import http from '../util/http.js';

export default {

    getWarehouseList:()=>{
        return http({
            method:"get",
            url:"api/warehouse/list"
        })
    },
    getWarehousePage:(page)=>{
        return http({
            method:"get",
            url:"api/warehouse/page",
            params:page
        });
    },

    deleteWarehouse: (Wid) => {
        return http({
            method: "delete",
            url: "api/warehouse/delete/" + Wid
        });
    },
    addSupplier:(obj)=>{
        return http({
            method:"post",
            url:"api/warehouse/add",
            data:obj,
            headers: {
                'Content-Type': 'application/json'
            }
        });
    },
    editWarehouse:(obj)=>{
        return http({
            method:"put",
            url:"api/warehouse/update",
            data:obj,
            headers: {
                'Content-Type': 'application/json'
            }
        });
    },
}